package com.sansecy.customview.view.CircleImageView;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import android.view.Gravity;
import android.view.ViewGroup;
import android.widget.FrameLayout;

import com.sansecy.customview.R;

public class CircleImageViewActivity extends AppCompatActivity {
    public static void start(Context context) {
        Intent starter = new Intent(context, CircleImageViewActivity.class);
        context.startActivity(starter);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_circle_image_view);
        CircleImageView imageView = new CircleImageView(this, 0);
        ViewGroup decorView = (ViewGroup) getWindow().getDecorView();
        FrameLayout.LayoutParams layoutParams = new FrameLayout.LayoutParams(300, 300);
        layoutParams.gravity = Gravity.CENTER;
        decorView.addView(imageView, layoutParams);
//        imageView.setBackgroundColor(Color.GRAY);
    }
}
